/* static/css/contract-edit.css */
.contract-edit-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.back-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.btn-back {
    background-color: #6c757d;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 1rem;
}

.module-title {
    font-size: 1.5rem;
    color: #333;
}

.contract-form {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 2rem;
}

.form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.form-section h3 {
    font-size: 1.1rem;
    color: #4a6cf7;
    margin-bottom: 1rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
}

.form-group.full-width {
    flex: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.attachment-upload {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.attachment-upload input[type="file"] {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn-upload {
    padding: 0.5rem 1rem;
    background-color: #4a6cf7;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-upload:hover {
    background-color: #3a5bd9;
}

.attachment-list table {
    width: 100%;
    border-collapse: collapse;
}

.attachment-list th,
.attachment-list td {
    padding: 0.8rem;
    border: 1px solid #ddd;
    text-align: left;
}

.attachment-list th {
    background-color: #f5f5f5;
    font-weight: 600;
}

.attachment-list tr:nth-child(even) {
    background-color: #f9f9f9;
}

.no-attachments {
    text-align: center;
    color: #666;
    font-style: italic;
}

.btn-download {
    display: inline-block;
    padding: 5px 10px;
    margin-right: 5px;
    background-color: #4e73df;
    color: white;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
}

.btn-download:hover {
    background-color: #3a5ec0;
}

.btn-delete {
    padding: 5px 10px;
    background-color: #e74a3b;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    display: inline-block;
    min-width: 50px;
}

.btn-delete:hover {
    background-color: #d52a1a;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-primary {
    padding: 0.5rem 1.5rem;
    background-color: #4a6cf7;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary:hover {
    background-color: #3a5bd9;
}

.btn-cancel {
    padding: 0.5rem 1.5rem;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    text-align: center;
}

.btn-cancel:hover {
    background-color: #5a6268;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .attachment-upload {
        flex-direction: column;
        align-items: flex-start;
    }

    .attachment-upload input[type="file"] {
        width: 100%;
    }

    .attachment-upload button {
        width: 100%;
    }
}